ported to new testing framework.
author13:38:36 Tim Janik <timj@imendio.com>
Thu, 6 Dec 2007 12:38:00 +0000 (12:38 +0000)
committerTim Janik <timj@src.gnome.org>
Thu, 6 Dec 2007 12:38:00 +0000 (12:38 +0000)
2007-12-06 13:38:36  Tim Janik  <timj@imendio.com>

        * tests/floatingtest.c: ported to new testing framework.

        * tests/Makefile.am: run floatingtest as testing framework test.

svn path=/trunk/; revision=19118

ChangeLog
tests/Makefile.am
tests/floatingtest.c

index e295aecd1682a880e89061889b44a3fb16d1d5a2..2748eda802e38583fabf1486de42ba8d1d485c94 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-12-06 13:38:36  Tim Janik  <timj@imendio.com>
+
+       * tests/floatingtest.c: ported to new testing framework.
+
+       * tests/Makefile.am: run floatingtest as testing framework test.
+
 2007-12-06 10:44:52  Tim Janik  <timj@imendio.com>
 
        * tests/autotestfilechooser.c: majorly speed up execution by reducing
index ccee78151bb06ea81ffb912484f1a0f2a4564a42..4435750b50f88fd8df64bd6d25c422938032f089 100644 (file)
@@ -25,7 +25,9 @@ if USE_X11
 testsocket_programs = testsocket testsocket_child
 endif
 
-
+TEST_PROGS                     += floatingtest
+floatingtest_DEPENDENCIES       = $(TEST_DEPS)
+floatingtest_LDADD              = $(LDADDS)
 TEST_PROGS                      += objecttests
 objecttests_SOURCES              = objecttests.c
 objecttests_LDADD                = $(LDADDS)
@@ -36,11 +38,10 @@ autotestfilechooser_LDADD        = $(LDADDS)
 autotestfilechooser_SOURCES      = autotestfilechooser.c
 
 
-TESTS = floatingtest buildertest
+TESTS = buildertest
 
 noinst_PROGRAMS =  $(TEST_PROGS)       \
        autotestkeywords                \
-       floatingtest                    \
        buildertest                     \
        simple                          \
        print-editor                    \
@@ -117,7 +118,6 @@ endif
 endif
 
 simple_DEPENDENCIES = $(TEST_DEPS)
-floatingtest_DEPENDENCIES = $(TEST_DEPS)
 buildertest_DEPENDENCIES = $(TEST_DEPS)
 print_editor_DEPENDENCIES = $(TEST_DEPS)
 testicontheme_DEPENDENCIES = $(TEST_DEPS)
@@ -173,7 +173,6 @@ testtooltips_DEPENDENCIES = $(TEST_DEPS)
 testvolumebutton_DEPENDENCIES = $(TEST_DEPS)
 
 simple_LDADD = $(LDADDS)
-floatingtest_LDADD = $(LDADDS)
 buildertest_LDADD = $(LDADDS)
 print_editor_LDADD = $(LDADDS)
 testaccel_LDADD = $(LDADDS)
index 458acd887b8c53f743232b64e719e2983f792bdf..d0682cf5d22c47be20f7db35793877d28d3da7cc 100644 (file)
 #include "../gtk/gtk.h"
 
 static gboolean destroyed = FALSE;
-static void destroy (void) { destroyed = TRUE; }
-     
-int
-main (int   argc,
-      char *argv[])
+static void
+destroy (void)
 {
-  GtkWidget *widget;
-  gtk_init (&argc, &argv);
+  destroyed = TRUE;
+}
 
-  widget = g_object_new (GTK_TYPE_LABEL, NULL);
+static void
+floating_tests (void)
+{
+  GtkWidget *widget = g_object_new (GTK_TYPE_LABEL, NULL);
   g_object_connect (widget, "signal::destroy", destroy, NULL, NULL);
 
   g_assert (GTK_OBJECT_FLOATING (widget));
@@ -59,6 +59,13 @@ main (int   argc,
   g_assert (!destroyed);
   g_object_unref (widget);
   g_assert (destroyed);
-  
-  return 0;
+}
+
+int
+main (int   argc,
+      char *argv[])
+{
+  gtk_test_init (&argc, &argv);
+  g_test_add_func ("/floatingtest", floating_tests);
+  return g_test_run();
 }